package cn.swust.designpatternlearningplatform;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.annotation.PostConstruct;

/**
 * @author 唐忠政
 */
@Slf4j
@SpringBootApplication
@EnableScheduling
public class DesignPatternLearningPlatformApplication {
    /*
     * 解决druid 日志报错：discard long time none received connection:xxx
     * */
    @PostConstruct
    public void setProperties(){
        System.setProperty("druid.mysql.usePingMethod","false");
    }
    public static void main(String[] args) {
        SpringApplication.run(DesignPatternLearningPlatformApplication.class, args);
        log.info("项目启动成功！");
    }

}
